package designPatterns.P15_迭代器模式_Iterator;

public class P01 {
    public static void main(String[] args) {
        NameRepository repository = new NameRepository();
        for (Iterator iterator = repository.getIterator(); iterator.hasNext();) {
            String name = (String) iterator.next();
            System.out.println(name);
        }
    }
}
